/**
 * 站点共用JS
 */

/**
 * [初始化] 淘宝图片
 */
function initPic(tbpItem, tbpShop) {
	if (undefined == tbpItem) tbpItem = "tbpItem";
	if (undefined == tbpShop) tbpShop = "tbpShop";

	///
	$("img."+ tbpItem).each(function() {
		var _this = $(this);
		var src = _this.attr(tbpItem);
		src = jQuery.base64Decode(src);

		///
		var img = new Image();
		img.onload = function() {
			_this.hide();
			_this.attr("src", src+"_160x160.jpg");
			_this.fadeIn("show");
		}
		img.src = src;
	});
}

/// PAGE
window.onload = function() {
	initPic();
}
